////
// Shape/Symbol/Infinity
// 
// @author Nicolas Gallagher @necolas
// @author Maxime Thirouin m@moox.fr @MoOx
///

@mixin infinity($width: 212px, $height: 100px, $background-color: transparent)
{
    $coefficient: 2.12;
    @if $width == false
    {
        $width : $height*$coefficient;
    }
    @if $height == false
    {
        $height : $width/$coefficient;
    }
    position: relative;
    width: $width;
    height: $height;

    &:before,
    &:after
    {
        content: "";
        position: absolute;
        top: 0;

        width: $height*.6;
        height: $height*.6;
        border: $height*.2 solid $background-color;
    }

    $radius: $height/2;
    &:before
    {
        left: 0;
        @include border-radius($radius $radius 0 $radius);
        @include transform(rotate(-45deg));
    }

    &:after
    {
        right: 0;
        @include border-radius($radius $radius $radius 0);
        @include transform(rotate(45deg));
    }
}